import 'package:flutter/material.dart';
import 'package:hospitable_rental/widgets/common_image.dart';
import 'home_navigator_item.dart';

class HomeNavigator extends StatelessWidget {
  const HomeNavigator({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(vertical: 15.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: navigatorItemList
            .map(
              (item) => InkWell(
                child: Column(
                  children: [
                    CommonImage(item.imageUri, width: 32.0),
                    SizedBox(height: 8.0),
                    Text(
                      item.title,
                      style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500),
                    ),
                  ],
                ),
                onTap: () => item.onTap(context),
              ),
            )
            .toList(),
      ),
    );
  }
}
